-- GENERATED SPELL FOR [Cabal Familiar] --


function spell0_18641(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(20801,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18641', 2000, 1)
end

function spell1_18641(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(38239,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18641', 2000, 1)
end

function Sorts_18641(pUnit, Event)
local choix_sorts_18641 = math.random(0, 1)
if choix_sorts_18641 == 0 then
pUnit:RegisterEvent('spell0_18641', 1, 1)
end
if choix_sorts_18641 == 1 then
pUnit:RegisterEvent('spell1_18641', 1, 1)
end
end

function mob18641_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18641', math.random(1500, 3000), 1)
end

function mob18641_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18641_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18641_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18641, 1, 'mob18641_Action')
RegisterUnitEvent(18641, 2, 'mob18641_Leave')
RegisterUnitEvent(18641, 3, 'mob18641_Kill')
RegisterUnitEvent(18641, 4, 'mob18641_Die')
